package org.example.springboot.service;

import org.example.springboot.dao.UsersMapper;
import org.example.springboot.model.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsersService {
    @Autowired
    private UsersMapper usersMapper;

    public String insertUser(String username, String password) {
        usersMapper.insertUser(username, password);
        return "succeed";
    }

    public List<Users> findUserByUserName(String username) {
        return usersMapper.findUserByUserName(username);
    }

    public int loginVerify(String username, String password) {
        return usersMapper.loginVerify(username, password);
    }
}